import matplotlib.pyplot as plt
from collections import OrderedDict
from matplotlib import cm
import numpy as np

plt.figure(figsize=(1,10))
grid = plt.GridSpec(1, 10, wspace=0.5, hspace=0.5)

plt.subplot(grid[0,0:3])
plt.axis([0,1,0,1])
plt.xticks([])
plt.yticks([])
# plt.margins(0.1,0.1)

y=np.linspace(0,1,500)
x=np.ones(500)*10
cmap=cm.get_cmap(name='jet')
corlor=cmap(y)
fig=plt.barh(y,x,height=0.1,color =corlor,)

ymin=600
ymax=1000
step=8
i=0
round_num=0
if round_num==0:
    while i <=step:
        plt.text(x=1.3,y=i/step,s=str(round((ymax-ymin)/step*i+ymin)),size=12)
        i+=1
else:
    while i <=step:
        plt.text(x=1.3,y=i/step,s=str(round((ymax-ymin)/step*i+ymin,round_num)),size=12)
        i+=1

plt.savefig('2')
plt.show()
print("ok")
